Using color names is easy: instead of saying #ff0000
,
just say red
. For example, to make your document
background blue, use this <body>
tag:
<body bgcolor=blue>The final piece of this puzzle is knowing which color names are supported by the various browsers. Internet Explorer supports sixteen colors:
XXXX aqua | XXXX gray | XXXX navy | XXXX silver |
XXXX black | XXXX green | XXXX olive | XXXX teal |
XXXX blue | XXXX lime | XXXX purple | XXXX yellow |
XXXX fuchsia | XXXX maroon | XXXX red | XXXX white |
Netscape supports these colors, too. A quick check of the color sample next to each name should let you know if you browser can handle them as well.
Netscape also supports the hundreds of colors defined in the X Window color database. Unfortunately, not all of these colors are displayed correctly because the Netscape color map does not have entries corresponding to each of the colors. As a result, many of the colors are mapped to the nearest color in the map, resulting in some weird colors.
In any case, here are the supported Netscape colors with samples. Before choosing a color, make sure it displays correctly across several browsers, or you may get unexpected ugly pages!
XXXX aliceblue | XXXX goldenrod | XXXX navy |
XXXX antiquewhite | XXXX gray | XXXX navyblue |
XXXX aquamarine | XXXX green | XXXX oldlace |
XXXX azure | XXXX greenyellow | XXXX olivedrab |
XXXX beige | XXXX honeydew | XXXX orange |
XXXX bisque | XXXX hotpink | XXXX orangered |
XXXX black | XXXX indianred | XXXX orchid |
XXXX blanchedalmond | XXXX ivory | XXXX palegoldenrod |
XXXX blue | XXXX khaki | XXXX palegreen |
XXXX blueviolet | XXXX lavender | XXXX paleturquoise |
XXXX brown | XXXX lavenderblush | XXXX palevioletred |
XXXX burlywood | XXXX lawngreen | XXXX papayawhip |
XXXX cadetblue | XXXX lemonchiffon | XXXX peachpuff |
XXXX chartreuse | XXXX lightblue | XXXX peru |
XXXX chocolate | XXXX lightcoral | XXXX pink |
XXXX coral | XXXX lightcyan | XXXX plum |
XXXX cornflowerblue | XXXX lightgoldenrod | XXXX powderblue |
XXXX cornsilk | XXXX lightgoldenrodyellow | XXXX purple |
XXXX cyan | XXXX lightgray | XXXX red |
XXXX darkblue | XXXX lightgreen | XXXX rosybrown |
XXXX darkcyan | XXXX lightpink | XXXX royalblue |
XXXX darkgoldenrod | XXXX lightsalmon | XXXX saddlebrown |
XXXX darkgray | XXXX lightseagreen | XXXX salmon |
XXXX darkgreen | XXXX lightskyblue | XXXX sandybrown |
XXXX darkkhaki | XXXX lightslateblue | XXXX seagreen |
XXXX darkmagenta | XXXX lightslategray | XXXX seashell |
XXXX darkolivegreen | XXXX lightsteelblue | XXXX sienna |
XXXX darkorange | XXXX lightyellow | XXXX skyblue |
XXXX darkorchid | XXXX limegreen | XXXX slateblue |
XXXX darkred | XXXX linen | XXXX slategray |
XXXX darksalmon | XXXX magenta | XXXX snow |
XXXX darkseagreen | XXXX maroon | XXXX springgreen |
XXXX darkslateblue | XXXX mediumaquamarine | XXXX steelblue |
XXXX darkslategray | XXXX mediumblue | XXXX tan |
XXXX darkturquoise | XXXX mediumorchid | XXXX thistle |
XXXX darkviolet | XXXX mediumpurple | XXXX tomato |
XXXX deeppink | XXXX mediumseagreen | XXXX turquoise |
XXXX deepskyblue | XXXX mediumslateblue | XXXX violet |
XXXX dimgray | XXXX mediumspringgreen | XXXX violetred |
XXXX dodgerblue | XXXX mediumturquoise | XXXX wheat |
XXXX firebrick | XXXX mediumvioletred | XXXX white |
XXXX floralwhite | XXXX midnightblue | XXXX whitesmoke |
XXXX forestgreen | XXXX mintcream | XXXX yellow |
XXXX gainsboro | XXXX mistyrose | XXXX yellowgreen |
XXXX ghostwhite | XXXX moccasin | |
XXXX gold | XXXX navajowhite |